import request from '@/utils/request'

// 查询采购付款申请列表
export function listBuyPayReq(query) {
  return request({
    url: '/finance/buyPayReq/list',
    method: 'get',
    params: query
  })
}

// 查询采购付款申请详细
export function getBuyPayReq(id) {
  return request({
    url: '/finance/buyPayReq/' + id,
    method: 'get'
  })
}

// 新增采购付款申请
export function addBuyPayReq(data) {
  return request({
    url: '/finance/buyPayReq',
    method: 'post',
    data: data
  })
}


// 修改采购付款申请
export function updateBuyPayReq(data) {
  return request({
    url: '/finance/buyPayReq',
    method: 'put',
    data: data
  })
}

export function approvalBuyPayReq(data){
  return request({
    url: '/finance/buyPayReq/approval',
    method: 'post',
    data: data
  })
}

// 删除采购付款申请
export function delBuyPayReq(id) {
  return request({
    url: '/finance/buyPayReq/' + id,
    method: 'delete'
  })
}
